<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${message("admin.message.edit")}</title>
<meta name="author" content="EVOLUTION Team" />
<meta name="copyright" content="EVOLUTION" />
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<style type="text/css">
.roles label {
	width: 150px;
	display: block;
	float: left;
	padding-right: 6px;
}
</style>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	
	[@flash_message /]
	
	// 表单验证
	$inputForm.validate({
		rules: {
			username: {
				required: true,
				pattern: /^[0-9a-z_A-Z\u4e00-\u9fa5]+$/,
				minlength: 2,
				maxlength: 20,
				remote: {
					url: "check_username.jhtml",
					cache: false
				}
			},
			password: {
				required: true,
				pattern: /^[^\s&\"<>]+$/,
				minlength: 4,
				maxlength: 20
			},
			rePassword: {
				required: true,
				equalTo: "#password"
			},
			email: {
				required: true,
				email: true
			},
			roleIds: "required"
		},
		messages: {
			username: {
				pattern: "${message("admin.validate.illegal")}",
				remote: "${message("admin.validate.exist")}"
			},
			password: {
				pattern: "${message("admin.validate.illegal")}"
			}
		}
	});
	
});
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/admin/common/index.jhtml">${message("admin.path.index")}</a> &raquo; ${message("admin.message.edit")}
	</div>
	<form id="inputForm" action="save.jhtml" method="post">
		<ul id="tab" class="tab">
			<li>
				<input type="button" value="${message("admin.message.tableOne")}" />
			</li>
			<li>
				<input type="button" value="${message("admin.message.tableTwo")}" />
			</li>
		</ul>
		<table class="input tabContent" id="tableOne">
		    <tr>
		       <td colspan="8" class="styleTitle">
		          ${message("admin.message.tableOneTitle")}
		       </td>
		    </tr>
		    <!-- The first row -->
			<tr>
				<th>
					${message("admin.message.cardId")}:
				</th>
				<td>
					<input type="text" name="username" class="text" maxlength="30" />
				</td>
				<th>
				    ${message("admin.message.gender")}:
				</th>
				<td>
				    <label>
				        <input type="checkbox" name="isMale" value="true"/>${message("admin.message.male")}
				        <input type="hidden" name="_isMale" value="false">
				    </label>
				    <label>
				        <input type="checkbox" name="isFemale" value="true"/>${message("admin.message.female")}
				        <input type="hidden" name="_isFemale" value="false">				    
				    </label>
				</td>
				<th>
				    ${message("admin.message.name")}:
				</th>
				<td>
				    <input type="text" name="name" class="text" maxlength="20"/>
				</td>
				<th>
				    ${message("admin.message.alias")}:
				</th>
				<td>
				    <input type="text" name="alias" class="text" maxlength="20"/>
				</td>
			</tr>
			<!-- The second row -->
			<tr>
			    <th>
			        ${message("admin.message.arrestAge")}:
			    </th>
			    <td>
			        <input type="text" name="ageOfArreset" class="text" maxlenth="4"/>
			    </td>
			    <th>
			       ${message("admin.message.marriage")}:
			    </th>
			    <td colspan="3">
			       <label>
				        <input type="checkbox" name="marriage" value="true"/>${message("admin.message.marriagedAfter")}
				        <input type="hidden" name="_isMarriage" value="false">			           
			       </label>
			       <label>
				        <input type="checkbox" name="marriage" value="true"/>${message("admin.message.marriagedBefore")}
				        <input type="hidden" name="_isMarriage" value="false">			           
			       </label>
			       <label>
				        <input type="checkbox" name="marriage" value="true"/>${message("admin.message.marriagedSepar")}
				        <input type="hidden" name="_isMarriage" value="false">			           
			       </label>
			       <label>
				        <input type="checkbox" name="marriage" value="true"/>${message("admin.message.marriagedDie")}
				        <input type="hidden" name="_isMarriage" value="false">			           
			       </label>			       				       			       
			    </td>
			    <th>
			        ${message("admin.message.parentDivorce")}:
			    </th>
			    <td>
			       <label>
				        <input type="checkbox" name="parentDivorce" value="true"/>${message("admin.message.common.yes")}
				        <input type="hidden" name="_isParentDivorce" value="false">			           
			       </label>
			       \
			       <label>
				        <input type="checkbox" name="parentDivorce" value="true"/>${message("admin.message.common.no")}
				        <input type="hidden" name="_isParentDivorce" value="false">			           
			       </label>				       			        
			    </td>
			</tr>
			
			<!-- the third row -->
			<tr>
			   <th>
			       ${message("admin.message.religion")}:
			   </th>
			   <td>
			       <input type="text" name="religion" class="text" maxlength="20"/>
			   </td>
			   <th>
			      ${message("admin.message.ethnic")}:
			   </th>
			   <td colspan="3">
			       <input type="text" name="ethnic" class="text" maxlength="20" />
			   </td>
			   <th>
			      ${message("admin.message.sonOfFarmer")}:
			   </th>
			   <td>
			       <label>
				        <input type="checkbox" name="sonOfFarmer" value="true"/>${message("admin.message.common.have")}
				        <input type="hidden" name="_isSonOfFarmer" value="false">			           
			       </label>
			       \
			       <label>
				        <input type="checkbox" name="sonOfFarmer" value="true"/>${message("admin.message.common.havnot")}
				        <input type="hidden" name="_isSonOfFarmer" value="false">			           
			       </label>	
			   </td>
			</tr>
			
			<!-- the fourth row -->
			<tr>
			    <th>
			        ${message("admin.message.householdAddress")}:
			    </th>
			    <td colspan="7">
			        
			    </td>
			</tr>
			
			<!-- the fifth row -->
			<tr>
			    <th>
			        ${message("admin.message.currentAddress")}:
			    </th>
			    <td colspan="7">
			    
			    <td>
			</tr> 
			
			<!-- the sixth row -->
			<tr>
			    <th>
			        ${message("admin.message.temporary")}:
			    </th>
			    <td colspan="7">
			    
			    </td>
			</tr>
			
			<!-- the seventh row -->
			<tr>
			    <th>
			        ${message("admin.message.profession")}:
			    </th>
			    <td colspan="7">
			    
			    </td>
			</tr>	
			
			<!-- the eighth row -->
			<tr>
			    <th>
			        ${message("admin.message.education")}:
			    </th>
			    <td colspan="7">
			    
			    </td>
			</tr>
			
			<!-- the ninth row -->
			<tr>
			    <th>
			        ${message("admin.message.caseType")}:
			    </th>
			    <td colspan="3">
			    </td>
			    <th>
			        ${message("admin.message.location")}:
			    </th>
			    <td colspan="3">
			    </td>			    
			</tr>
			
			<!-- the tenth row -->
			<tr>
			    <th>
			        ${message("admin.message.ownCellPhone")}:
			    </th>
			    <td colspan="7">
			       <label>
				        <input type="checkbox" name="cellPhoneNum" value="true"/>${message("admin.message.cellPhoneNo")}
				        <input type="hidden" name="_isCellPhoneNum" value="false">			           
			       </label>			    
			       <label>
				        <input type="checkbox" name="cellPhoneNum" value="true"/>${message("admin.message.cellPhoneYes")}
				        <input type="hidden" name="_isCellPhoneNum" value="false">			           
			       </label>
			    <td/>
			</tr>
			
			<!-- the eleventh row -->
			<tr>
			    <th>
			        ${message("admin.message.beforeArrestDay")}:
			    </th>
			    <td colspan="7">
			        
			    </td>
			</tr>
			
			<!-- the 12 row -->
			<tr>
			    <th>
			        ${message("admin.message.criminalBefore")}:
			    </th>
			    <td colspan="7">
			    </td>
			</tr>
			
			<!-- the 13 row --> 
			<tr>
			    <th>
			        ${message("admin.message.policerDepartment")}:
			    </th>
			    <td colspan="2">
			        <input type="text" name="" class="text" maxlength="20" />
			    </td>			
			    <th>
			        ${message("admin.message.policerName")}:
			    </th>
			    <td colspan="2">
			        <input type="text" name="" class="text" maxlength="20" />
			    </td>
			    <th>
			        ${message("admin.message.createTableDate")}:
			    </th>
			    <td>
			        
			    </td>
			</tr>
			
		</table>
		<table class="input tabContent">
		    <tr>
		       <td colspan="7" class="styleTitle">
		          ${message("admin.message.tableTwoTitle")}
		       </td>
		    </tr>
		</table>
		<table class="input">
			<tr>
				<td style="text-align:center;">
					<input type="submit" class="button" value="${message("admin.common.submit")}" />
					<input type="button" class="button" value="${message("admin.common.back")}" onclick="location.href='list.jhtml'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>